@import 'lunaCol';
@import 'LunaAnimates';

@function Opacity($e) {
  @return transparentize($e, 0.45);
}

@function OpacityLighter($e) {
  @return transparentize($e, 0.75);
}

$BackgroundText: #ffffff;
$FocusText: #d84f71;
$WarningText: #dca400;
$SuccessText: #2fae47;
$AlertText: #9128b4;
$ErrorText: #bd2c23;
$Primary: #eb7290;
$PrimaryOpacity: Opacity($Primary);
$PrimaryOpacityLighter: OpacityLighter($Primary);
$PrimaryHover: scale-color($Primary, $lightness: +35%);
$PrimaryActive: scale-color($Primary, $lightness: -15%);
$Warning: #fecb37;
$WarningOpacity: Opacity($Warning);
$WarningOpacityLighter: OpacityLighter($Warning);
$WarningHover: scale-color($Warning, $lightness: +35%);
$WarningActive: scale-color($Warning, $lightness: -15%);
$Success: #10d56e;
$SuccessOpacity: Opacity($Success);
$SuccessOpacityLighter: OpacityLighter($Success);
$SuccessHover: scale-color($Success, $lightness: +35%);
$SuccessActive: scale-color($Success, $lightness: -15%);
$Alert: #7636ff;
$AlertOpacity: Opacity($Alert);
$AlertOpacityLighter: OpacityLighter($Alert);
$AlertHover: scale-color($Alert, $lightness: +35%);
$AlertActive: scale-color($Alert, $lightness: -15%);
$Error: #ff483d;
$ErrorOpacity: Opacity($Error);
$ErrorOpacityLighter: OpacityLighter($Error);
$ErrorHover: scale-color($Error, $lightness: +35%);
$ErrorActive: scale-color($Error, $lightness: -15%);
$WHITE: #ffffff;
$WHITE-OPACITY: Opacity($WHITE);

@mixin ModernColor {
  background: linear-gradient(to bottom right, #ffa290 20%, #ffbd7d 58%, #ff7398 100%);
}

@mixin StarSky {
  background: linear-gradient(to bottom right, #7891fc, #6ec9e9, #ff7398);
}

@mixin ElegantNight {
  background: linear-gradient(to bottom right, #002180, #1d5fc9, #001e9e);
}

@mixin MagicTrick {
  background: linear-gradient(to bottom right, #ef65b0, #aa24cb, #4f4cc4, #00fffc);
}
//
//Light & Dark Theme
//
.LightTheme {
  @import './LunaUI-LightColor';
}

.DarkTheme {
  @import './LunaUI-DarkColor';
}
//
// Public Color Config
//
@mixin colorConfig {
  .lunaLoading {
    background-color: $MaskOpacity;
  }
  .lunaModal {
    .modalMask {
      background: $MaskOpacity;
    }

    .modalContainer {
      background-color: $NormalBackground;
    }
  }
  .lunaInput {
    background-color: $NormalBackground;
    color: $PrimaryText;

    span {
      color: $PrimaryText;
    }
  }
  .darkShadow {
    box-shadow: $Shadow;
  }
  .lunaButton {
    color: $NormalBackground;
  }
  .lunaButton:hover {
    box-shadow: $HoverShadow;
  }
  .lunaButton {
    background-color: $NormalBackground;
    color: $PrimaryText;
  }
  .lunaContainer {
    background-color: $NormalBackground;
    color: $PrimaryText;
  }
  .lunaCard {
    background-color: $NormalBackground;
    color: $PrimaryText;

    .lunaCardTitle {
      border-bottom: 1px solid $LightDark;
    }
  }
  .lunaTable {
    box-shadow: $Shadow;
  }
  .lunaTable:hover {
    box-shadow: $HoverShadow;
  }
  .lunaTable.stripeRow {
    > tbody > tr:nth-child(even) {
      background-color: $DividerDarkColor;
      box-shadow: none;
    }
  }
  .lunaTable {
    background: $WHITE;

    thead {
      background: $LightDark;
    }

    tbody {
      tr {
        box-shadow: 0 1px 0 $DividerDarkColor;
      }
    }

    .currentRow {
      color: $WHITE;
    }
  }
  .lunaPage {
    background-color: $LightDark;

    span {
      color: $WHITE;
    }

    .lunaPageCell {
      color: $PrimaryText;
    }
  }
  .lunaButton:disabled {
    background-color: $LightDark !important;
    color: $Ex-secondaryText !important;

    i {
      color: $Ex-secondaryText !important;
    }
  }
  .lunaInput.disabled {
    background-color: $LightDark !important;
    color: $Ex-secondaryText !important;

    input {
      background-color: $LightDark !important;
      color: $Ex-secondaryText !important;
    }
  }
  .lunaPageCell:disabled {
    background-color: $LightDark !important;
    color: $Ex-secondaryText !important;
  }
  .lunaSelect {
    .optionScrollBarHidden {
      background-color: $NormalBackground;
      box-shadow: $AroundShadow;
    }

    .lunaOption {
      color: $PrimaryText;
      border-bottom: 1px solid $LightDark;
    }

    .lunaOption.optionActive {
      color: $WHITE;
    }
  }
  .lunaMessage {
    .messageBody {
      box-shadow: $Shadow;
    }
  }
  .lunaForm {
    background-color: $NormalBackground;
    color: $PrimaryText;
  }
  .lunaPanel {
    .lunaPanelTitle {
      box-shadow: $Shadow;
      background-color: $LightDark;
    }
  }
  .lunaSwitch {
    box-shadow: $AroundShadow;
  }
  .lunaCheckbox.disabled {
    .emptyCheckbox {
      background-color: $LightDark !important;

      i {
        background-color: $LightDark;
        color: $Ex-secondaryText;
      }
    }

    .emptyCheckbox.checked {
      border: 1px solid $LightDark;
    }

    .emptyCheckbox.checkedWithLight {
      border: 1px solid $LightDark;
      box-shadow: 0 0 2px $LightDark;
    }

    color: $Ex-secondaryText !important;
  }
  .lunaRadio.disabled {
    .emptyRadio {
      background-color: $LightDark !important;

      .radioDot {
        background-color: $Ex-secondaryText;
        box-shadow: none;
      }
    }

    .emptyRadio.checked {
      border: 1px solid $LightDark;
    }

    .emptyRadio.checkedWithLight {
      border: 1px solid $LightDark;
      box-shadow: 0 0 2px $LightDark;
    }

    color: $Ex-secondaryText !important;
  }
  .lunaSwitch.disabled {
    color: $Ex-secondaryText !important;
  }
  .lunaCheckboxGroup.darkGroup,
  .lunaRadioGroup.darkGroup,
  .lunaSwitchGroup.darkGroup {
    background-color: $NormalBackground;
    color: $PrimaryText;
  }
  .lunaDatePickerPanel {
    box-shadow: $AroundShadow;

    .lunaDatePickerPanelYear {
      .lunaYearCell:hover {
        color: $PrimaryText;
      }

      .lunaYearCell.lunaActiveYear {
        color: $PrimaryText;
      }
    }

    .lunaDatePickerPanelMonth {
      .lunaMonthCell:hover {
        color: $PrimaryText;
      }

      .lunaMonthCell.lunaActiveMonth {
        color: $PrimaryText;
      }
    }

    .lunaDatePickerPanelDayList {
      .lunaDayCellOtherMonth:hover {
        color: $PrimaryText;
      }

      .lunaDayCellOtherMonth {
        color: $Ex-secondaryText;
      }
    }

    .lunaDatePickerPanelWeekList {
      background-color: $LightDark;
    }
  }
}



// Css Reset
*::-webkit-scrollbar {
  width: 5px;
  height: 5px;
  background-color: unset;
  border-radius: 500px;
}

*::-webkit-scrollbar-thumb {
  background-color: $Primary;
  border-radius: 500px;
}

*.disabled {
  cursor: no-drop !important;
}

* {
  padding: 0;
  margin: 0;
  font-size: 16px;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

.squareCorner {
  border-radius: 0 !important;
}

.smallCorner {
  border-radius: 4px !important;
}

.filletCorner {
  border-radius: 8px !important;
}

.largeCorner {
  border-radius: 15px !important;
}

.fullCorner {
  border-radius: 1000px !important;
}

.roundCorner {
  padding: 0 !important;
  border-radius: 50% !important;
}

.lunaModal {
  display: flex;
  position: fixed;
  z-index: 250;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;

  .modalMask {
    position: fixed;
    z-index: 200;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }

  .modalContainer {
    position: relative;
    padding-bottom: 16px;
    z-index: 250;

    .modalHeader {
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 8px 16px;
      border-bottom: 1px solid $PrimaryActive;
      background-color: $WHITE;
      position: relative;
      margin-bottom: 32px;

      > div {
        display: flex;
        align-items: center;
        justify-content: center;

        p {
          font-size: 22px;
          display: flex;
          align-items: center;

          i,
          img {
            margin-right: 8px;
          }
        }
      }

      p {
        font-size: 22px;
        display: flex;
        align-items: center;

        i,
        img {
          margin-right: 8px;
        }

        img {
          height: 75%;
        }
      }

      .titleIcon {
        margin-right: 8px;
      }

      > .closeIcon {
        cursor: pointer;
        position: absolute;
        right: 16px;
      }
    }

    .modalBody {
      padding: 0 16px;
      text-align: center;

      p {
        line-height: 24px;
      }
    }

    .modalFooter {
      padding-top: 32px;
      display: flex;
      justify-content: space-around;
      overflow: visible;
      width: 60%;
      margin: 0 auto;

      button {
        padding: 5px 25px;
        border-radius: 20px;
      }

      > div {
        overflow: visible;
        width: 100%;
        display: flex;
        justify-content: space-around;

        button {
          padding: 5px 25px;
          border-radius: 20px;
        }
      }
    }
  }

  .modalContainer.errorModal {
    .modalHeader {
      background-color: $Error;
      color: $WHITE;

      p {
        color: $WHITE !important;
      }
    }
  }

  .modalContainer.successModal {
    .modalHeader {
      background-color: $Success;
      color: $WHITE;

      p {
        color: $WHITE !important;
      }
    }
  }

  .modalContainer.warningModal {
    .modalHeader {
      background-color: $Warning;
      color: $WHITE;

      p {
        color: $WHITE !important;
      }
    }
  }

  .modalContainer.alertModal {
    .modalHeader {
      background-color: $Alert;
      color: $WHITE;

      p {
        color: $WHITE !important;
      }
    }
  }

  .modalContainer.primaryModal {
    .modalHeader {
      background-color: $Primary;
      color: $WHITE;

      p {
        color: $WHITE !important;
      }
    }
  }
}

.lunaInput {
  transition: all 0.5s;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  outline: 0;
  border: 1px solid #eeeeee;

  .iconfont.icon-cancel {
    font-size: 12px;
    margin-right: 8px;
  }

  input {
    border: 0;
    outline: 0;
    height: 100%;
    background: transparent;
    padding: 0 12px;
  }

  i {
    cursor: pointer;
    overflow: visible;
    transition: all 0.3s;
  }

  .icon-cancel {
    font-size: 8px;
  }

  .pre {
    position: relative;
    left: 12px;
  }

  .suffix {
    position: relative;
    right: 12px;
  }

  span {
    position: absolute;
    font-size: 8px;
    right: 4px;
  }
}

.lunaInput:hover {
  border: 1px solid $Primary !important;
}

.lunaInput.focusing {
  box-shadow: 0 0 0 2px $PrimaryOpacity !important;
  border: 1px solid $Primary !important;
}

.lunaInput.ghostInput {
  background-color: transparent !important;
}

.lunaInput.disabled {
  cursor: no-drop !important;

  input {
    cursor: no-drop !important;
  }
}

.lunaButton {
  min-width: 64px;
  display: flex;
  transition: all 0.25s;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: visible;
  flex-shrink: 0;

  i {
    transition: all 0.5s;
    overflow: visible;
  }

  .buttonImg {
    height: 18px;
    flex-shrink: 0;
  }

  .lunaBadge {
    right: 0;
    top: 0;
  }
}

.lunaButton:disabled {
  pointer-events: unset;
  cursor: no-drop !important;
}

@each $type, $color, $hover in (primary, $Primary, $PrimaryHover), (warning, $Warning, $WarningHover), (success, $Success, $SuccessHover), (error, $Error, $ErrorHover), (alert, $Alert, $AlertHover) {
  .lunaButton.#{$type}Button {
    background-color: $color;
    border-color: $color;
    color: $WHITE;

    &:hover {
      background-color: $hover;
    }
  }
}

.lunaButton.textButton {
  background-color: transparent !important;
  border: 1px solid transparent !important;
  box-shadow: none;
}

.lunaButton.ghostButton {
  background-color: transparent !important;
}

@each $type, $color, $hover in (primary, $Primary, $PrimaryHover), (warning, $Warning, $WarningHover), (success, $Success, $SuccessHover), (error, $Error, $ErrorHover), (alert, $Alert, $AlertHover) {
  .lunaButton.textButton.#{$type}Button,
  .lunaButton.ghostButton.#{$type}Button {
    color: $color !important;

    &:hover {
      color: $hover !important;
    }
  }
}

@each $type, $color, $hover in (primary, $Primary, $PrimaryHover), (warning, $Warning, $WarningHover), (success, $Success, $SuccessHover), (error, $Error, $ErrorHover), (alert, $Alert, $AlertHover) {
  .lunaButton.ghostButton.#{$type}Button {
    border-color: $color !important;

    &:hover {
      border-color: $hover !important;
    }
  }
}

.lunaButton.filletCorner {
  .lunaBadge {
    right: 1px;
    top: 1px;
  }
}

.lunaButton.largeCorner {
  .lunaBadge {
    right: 4px;
    top: 4px;
  }
}

.lunaButton.roundCorner {
  .lunaBadge {
    right: 8%;
    top: 35%;
  }
}

.pre {
  margin-right: 6px;
}

.suffix {
  margin-left: 6px;
}

.lunaLoadingDot {
  position: relative;
  margin-right: 8px;
  display: block;
  border-radius: 50%;
  background-color: $Primary;
  width: 20px;
  height: 20px;
  -webkit-animation: ani-spin-bounce 1s 0s ease-in-out infinite;
  animation: bounce 1s 0s ease-in-out infinite;

  @keyframes bounce {
    0% {
      -webkit-transform: scale(0);
      transform: scale(0);
    }

    100% {
      -webkit-transform: scale(1);
      transform: scale(1);
      opacity: 0;
    }
  }
}

.lunaBadge {
  width: 6px;
  height: 6px;
  border-radius: 6px;
  background-color: $Error;
  position: absolute;
  right: -4px;
  top: -4px;
  border: 1px solid $WHITE;
}

.lunaBadge.errorBadge {
  background-color: $Error;
}

.lunaBadge.successBadge {
  background-color: $Success;
}

.lunaBadge.alertBadge {
  background-color: $Alert;
}

.lunaBadge.warningBadge {
  background-color: $Warning;
}

.lunaRow {
  overflow: auto;
  display: flex;

  > .lunaCol {
    border-left: 0 !important;
  }

  > .lunaCol:last-of-type {
    border-right: 0 !important;
  }
}

.lunaContainer {
  transition: all 0.5s;
  overflow: auto;
}

.lunaCard {
  transition: all 0.5s;

  .lunaCardTitle {
    width: 100%;
    height: 36px;
    line-height: 36px;
    padding: 0 16px;
    text-align: left;
    display: flex;
    align-items: center;

    i,
    img {
      margin-right: 6px;
    }
  }

  .lunaCardBody {
    text-align: left;
    height: calc(100% - 36px);
    padding: 16px;

    p,
    span,
    li,
    i,
    a,
    b,
    figcaption,
    div {
      font-size: 14px;
      word-break: break-word;
    }
  }
}

.lunaTable {
  width: 100%;
  position: relative;
  transition: all 0.5s;
  overflow: hidden;

  thead {
    > tr {
      height: 32px;
      line-height: 32px;
      font-size: 14px;

      > th {
        border-left: 0 !important;
        font-size: 12px;
        padding: 0 8px;
      }

      > th:last-of-type {
        border-right: 0 !important;
      }
    }

    tr:first-of-type {
      border-top: 0 !important;

      th {
        border-top: 0 !important;
      }
    }
  }

  tbody {
    min-height: 32px;

    tr {
      border-bottom: 0 !important;
      border-left: 0 !important;
      height: 42px;
      line-height: 20px;
      transition: all 0.5s;

      td {
        border-bottom: 0 !important;
        border-left: 0 !important;
        font-size: 12px;
        padding: 0 8px;
      }

      td:last-of-type {
        border-right: 0 !important;
      }
    }

    tr:first-of-type {
      border-top: 0 !important;

      td {
        border-top: 0 !important;
      }
    }
  }
}

.lunaTable.headerFixed {
  thead {
    display: table;
    width: 100%;
    table-layout: fixed;
    /**表格列的宽度由表格宽度决定，不由内容决定*/
    text-align: center;
  }

  tbody {
    display: block;
    overflow: auto;

    tr {
      display: table;
      width: 100%;
      table-layout: fixed;
      /**表格列的宽度由表格宽度决定，不由内容决定*/
      text-align: center;
    }
  }
}

.lunaTable {
  .hoverRow {
    background-color: $PrimaryHover !important;
  }

  .currentRow {
    background-color: $Primary !important;
  }
}

.lunaPage {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 8px 16px;
  margin-top: 16px;
  position: relative;

  .lunaPageCell {
    margin-right: 8px;
    min-width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    font-size: 12px;
  }

  .pagination {
    color: $Primary;

    i {
      font-size: 10px;
    }
  }

  .lunaPageCell:disabled {
    cursor: no-drop !important;
  }

  .pageElevator {
    display: flex;
    align-items: center;
    justify-content: center;

    span {
      margin: 0 4px;
      font-size: 12px;
    }
  }

  .pageCounter {
    position: absolute;
    font-size: 12px;
    left: 16px;
  }

  .lunaPageCell:hover {
    background-color: $PrimaryHover !important;
  }

  .lunaPageCell.pageCellActive {
    background-color: $Primary !important;
    color: $WHITE;
  }
}

.lunaSelect {
  display: inline-block;
  cursor: pointer;
  overflow: visible;
  position: relative;
  z-index: 5;
  height: 32px;

  .lunaInput {
    position: absolute;
    top: 0;
    left: 0;

    input {
      cursor: pointer !important;
    }
  }

  .optionScrollBarHidden {
    position: absolute;
    top: 36px;
    width: 100%;
    z-index: -1;
    overflow: hidden !important;

    > div {
      overflow: auto;
      width: 100%;
      max-height: 175px;
    }

    .lunaOption {
      padding: 6px 8px;
      transition: all 0.5s;
      width: 100%;
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
    }

    .lunaOption.optionWrap {
      text-overflow: inherit;
      white-space: pre-wrap;
      overflow: visible;
    }

    .lunaOption:last-of-type {
      border-bottom: 0;
    }
  }

  .lunaOption:hover {
    background-color: $PrimaryHover;
  }

  .lunaOption.optionActive {
    background-color: $Primary;
  }
}

.lunaForm {
  text-align: left;
  transition: all 0.5s;
  overflow: hidden;

  .lunaFormItem {
    padding: 4px 8px 8px;
    margin-bottom: 6px;
    position: relative;
    transition: all 0.35s;
    overflow: visible;

    .errorText {
      color: $Error;
    }

    > div {
      overflow: visible;
    }

    span.required:before {
      display: inline-block;
      line-height: 1;
      color: $ErrorText;
      font-family: SimSun;
      content: '*';
    }

    p {
      font-size: 12px;
      line-height: 16px;
      transition: all 0.35s;
      position: relative;
      padding-top: 2px;
    }

    .moveToBottom {
      //top: 16px;
    }
  }

  .lunaFormItem.leftLabel {
    display: flex;
    align-items: center;

    span {
      display: inline-block;
      text-align: right;
      padding-right: 8px;
    }
  }

  .lunaFormItem.rightLabel {
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }

  .lunaFormItem.topLabel {
    display: flex;
    flex-direction: column;

    span {
      display: inline-block;
      text-align: left;
    }
  }

  .lunaFormItem.errBorder {
    border: 1px solid $Error;
  }
}

.lunaMessage {
  position: fixed;
  width: 100%;
  top: 16px;
  left: 0;
  text-align: center;
  pointer-events: none;
  overflow: visible;

  i {
    margin-right: 6px;
  }

  .messageBody {
    display: inline-block;
    //width: auto!important;
    padding: 8px 16px;
    border-radius: 3px;
    margin-bottom: 8px;
    font-weight: 600;
  }

  .messageBody.warningMessage {
    border: 1px solid $Warning;
    background-color: $Warning;

    i,
    span {
      color: $WHITE;
    }
  }

  .messageBody.errorMessage {
    border: 1px solid $Error;
    background-color: $Error;

    i,
    span {
      color: $WHITE;
    }
  }

  .messageBody.successMessage {
    border: 1px solid $Success;
    background-color: $Success;

    i,
    span {
      color: $WHITE;
    }
  }

  .messageBody.primaryMessage {
    border: 1px solid $Primary;
    background-color: $Primary;

    i,
    span {
      color: $WHITE;
    }
  }

  .messageBody.alertMessage {
    border: 1px solid $Alert;
    background-color: $Alert;

    i,
    span {
      color: $WHITE;
    }
  }

  .messageBody.normalMessage {
    border: 1px solid $Primary;
    background-color: $WHITE;

    i {
      color: $Primary;
    }
  }

  .alertClose {
    margin-right: 0;
    margin-left: 6px;
    border: 1px solid #333;
  }
}

.lunaTree {
  .lunaTreeItem {
    margin-left: 24px;

    .lunaItemInner {
      display: flex;
      align-items: center;
      cursor: pointer;
      transition: all 0.3s;
      position: relative;

      .arrowIcon {
        position: absolute;
        display: block;
        text-align: center;
        width: 22px;
        transition: all 0.3s cubic-bezier(0.8, 0, 0.2, 1) 0s;

        i {
          font-size: 12px;
        }

        i:before {
          margin-top: 4px;
        }
      }

      .arrowIcon.arrowActive {
        transform: rotate(90deg);
      }
    }

    .lunaItemInner:hover {
      background: $PrimaryOpacity;
    }

    .lunaTreeCell {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      margin-left: 20px;
    }
  }
}

.lunaCollapse {
  background-color: $WHITE;
  border: 1px solid #eeeeee;

  .lunaPanel {
    .lunaPanelTitle {
      padding: 4px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;

      > div {
        transition: all 0.25s;
      }

      .rotate90 {
        transform: rotate(-90deg);
      }

      .rotate180 {
        transform: rotate(180deg);
      }

      span {
        margin-right: 8px;
      }
    }

    .lunaPanelBody {
      position: relative;
      padding: 8px;
    }
  }
}

@mixin emptyFrame {
  width: 16px;
  height: 16px;
  border: 1px solid #dcdee2;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: all ease-in 0.15s;
  flex-shrink: 0;
  margin-right: 4px;
  box-shadow: 0 0 2px transparent;
  position: relative;
}

.lunaCheckbox {
  align-items: center;
  cursor: pointer;
  transition: all 0.5s;
  display: inline-flex;

  .emptyCheckbox {
    @include emptyFrame();

    i {
      width: 100%;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 12px;
      background-color: $Primary;
      color: $WHITE;
      position: absolute;
      top: 0;
      left: 0;
    }
  }

  > img,
  > i {
    margin-right: 2px;
  }

  .emptyCheckbox.checked {
    border: 1px solid $PrimaryOpacity;
  }

  .emptyCheckbox.checkedWithLight {
    border: 1px solid $PrimaryOpacity;
    box-shadow: 0 0 2px $Primary;
  }
}

.lunaCheckbox.checked {
  color: $Primary;
  border-color: $Primary !important;
}

.lunaCheckbox.disabled {
  cursor: no-drop !important;
}

.lunaRadio {
  align-items: center;
  cursor: pointer;
  transition: all 0.5s;
  display: inline-flex;

  .emptyRadio {
    @include emptyFrame();

    .radioDot {
      width: 70%;
      height: 70%;
      display: flex;
      align-items: center;
      justify-content: center;
      background-color: $Primary;
      box-shadow: 0 0 2px $Primary;
      position: absolute;
    }
  }

  > img,
  > i {
    margin-right: 2px;
  }

  .emptyRadio.checked {
    border: 1px solid $PrimaryOpacity;
  }

  .emptyRadio.checkedWithLight {
    border: 1px solid $PrimaryOpacity;
    box-shadow: 0 0 2px $Primary;
  }
}

.lunaRadio.checked {
  color: $Primary;
  border-color: $Primary !important;
}

.lunaRadio.disabled {
  cursor: no-drop !important;
}

.lunaCheckboxGroup,
.lunaRadioGroup,
.lunaSwitchGroup {
  flex-wrap: wrap;
}

.lunaSwitch {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 2px;
  min-width: 44px;
  height: 22px;
  background: #efefef;
  position: relative;
  cursor: pointer;
  transition: all 0.35s;

  .switchBtn {
    width: 18px;
    height: 18px;
    background-color: #ffffff;
    position: absolute;
    left: 2px;
    transition: all 0.35s cubic-bezier(1, 0.3, 0.3, 1) 0s;
  }

  .lunaLoadingDot {
    position: absolute;
    width: 18px !important;
    height: 18px !important;
    background-color: $Primary !important;
  }

  .switchBtn.switchKeyModern {
    background-color: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;

    > div {
      width: 10px;
      height: 10px;
      background-color: rgba(0, 0, 0, 0.2);
      border: 1px solid $WHITE;
    }
  }

  .falseSetPlace {
    padding-left: 20px;
    margin-right: 8px;
  }

  .trueSetPlace {
    padding-right: 20px;
    margin-left: 8px;
  }
}

.lunaSwitch.disabled {
  background-color: #cccccc !important;
  cursor: no-drop !important;
}

.lunaSwitch.switchBoxOn {
  background-color: $Primary;
  box-shadow: 0 0 5px $Primary;
  justify-content: flex-start;

  .switchBtn.switchKeyModern {
    background-color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;

    > div {
      width: 12px;
      height: 12px;
      background-color: rgba(255, 255, 255, 0.3);
    }
  }
}

.lunaSwitchGroup {
  .lunaSwitchItem {
    margin-bottom: 16px;
    display: flex;
    align-items: center;

    .lunaSwitch {
      margin-left: 4px;
    }
  }
}

.lunaDatePicker {
  display: inline-block;

  .lunaDatePickerPanelNormalHeader {
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 32px;
    padding: 0 8px;

    .dateItemGroup {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 120px;
    }

    .cgItemBtn,
    i {
      cursor: pointer;
      transition: 0.25s;
      padding: 0 4px;
      font-size: 12px;
      border-radius: 4px;
    }

    .cgItemBtn:hover {
      background-color: $PrimaryOpacity;
      color: $FocusText;
    }

    i {
      font-size: 8px;
      padding: 4px;
    }

    i:hover {
      background-color: $PrimaryOpacity;
      color: $FocusText;
    }
  }

  .lunaInput {
    input {
      cursor: pointer;
    }
  }

  .lunaDatePickerPanel {
    width: 200px;
    margin-top: 4px;
    position: relative;
    overflow: hidden;

    .lunaDatePickerPanelYear {
      width: 100%;

      .lunaYearCell {
        text-align: center;
        height: 31.2px;
        line-height: 31.2px;
        cursor: pointer;
        transition: all 0.25s;
      }

      .lunaYearCell:hover {
        background-color: $PrimaryOpacity;
      }

      .lunaYearCell.lunaActiveYear {
        background-color: $PrimaryOpacity;
        box-shadow: 0 0 2px $Primary;
      }
    }

    .lunaDatePickerPanelMonth {
      width: 100%;
      height: 156px;
      padding: 0 16px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;

      .lunaMonthCell {
        width: 32px;
        height: 32px;
        line-height: 32px;
        margin: 5px;
        text-align: center;
        cursor: pointer;
        transition: all 0.25s;
        border-radius: 5px;
      }

      .lunaMonthCell:hover {
        background-color: $PrimaryOpacity;
      }

      .lunaMonthCell.lunaActiveMonth {
        background-color: $PrimaryOpacity;
        box-shadow: 0 0 2px $Primary;
      }
    }

    .lunaDatePickerPanelDay {
      width: 100%;

      .lunaDayRangeActive {
        background-color: $PrimaryOpacity;
      }

      .lunaDayCell,
      .lunaWeekCell,
      .lunaDayCellOtherMonth {
        width: 24px;
        height: 24px;
        line-height: 24px;
        text-align: center;
        font-size: 12px;
        transition: all 0.25s;
        border-radius: 4px;
        cursor: pointer;
        position: relative;
      }

      .todayDot {
        position: absolute;
        top: 0;
        right: 0;
        width: 8px;
        height: 8px;
        border-radius: 8px;
        background-color: $Primary;
      }

      .lunaDatePickerPanelDayList {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        padding: 6px;
      }

      .lunaDayCell.lunaActiveDay {
        background-color: $Primary;
        color: $WHITE;
        box-shadow: 0 0 2px $Primary;
      }

      .lunaDayCell:hover {
        background-color: $PrimaryHover;
        color: $WHITE;
      }

      .lunaDatePickerPanelWeekList {
        display: flex;
        padding: 0 6px;

        .lunaWeekCell {
          color: darkgray;
        }
      }
    }
  }

  .lunaDatePickerPanel.rangeContainer {
    width: 400px;

    .rangeBody {
      display: flex;

      .startDate,
      .endDate {
        width: 200px;
        display: flex;

        .lunaDatePickerPanelYear {
          height: 100%;
          display: flex;
          flex-direction: column;
          justify-content: space-between;
        }

        .lunaDatePickerPanelMonth {
          height: 100%;
        }
      }
    }
  }
}

.flex {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.block {
  display: block;
}

.zIndexHide {
  z-index: -2 !important;
}

.scrollable {
  overflow: auto;
}

.LunaRipple {
  position: absolute;
  border-radius: 100%;
  background-clip: padding-box;
  pointer-events: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-transform: scale(0);
  -ms-transform: scale(0);
  transform: scale(0);
  opacity: 1;
}

.LunaRipple.z-active {
  opacity: 0;
  -webkit-transform: scale(2);
  -ms-transform: scale(2);
  transform: scale(2);
  transition: opacity 1.5s ease-out, transform 1s ease-out;
}

.lunaLoading {
  border-radius: inherit;
  width: 100%;
  height: 100%;
  font-size: 10px;
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;

  .face {
    position: absolute;
    border-radius: 50%;
    border-style: solid;
    animation: animate 3s ease-in-out infinite;
    overflow: visible;

    .circle {
      position: absolute;
      width: 50%;
      height: 0.1em;
      top: 50%;
      left: 50%;
      background-color: transparent;
      transform: rotate(var(--deg));
      transform-origin: left;
      overflow: visible;
    }

    .circle::before {
      position: absolute;
      top: -10px;
      right: -15px;
      content: '';
      width: 10px;
      height: 10px;
      background-color: currentColor;
      border-radius: 50%;
      box-shadow: 0 0 30px #fff;
      overflow: visible;
    }
  }

  .face:nth-child(1) {
    width: 40px;
    height: 40px;
    color: $WHITE;
    border-color: currentColor transparent transparent currentColor;
    border-width: 6px 6px 0 0;
    --deg: -45deg;
    animation-direction: normal;
    overflow: visible;
  }

  .face:nth-child(2) {
    width: 60px;
    height: 60px;
    color: $Primary;
    border-color: currentColor currentColor transparent transparent;
    border-width: 6px 0 0 6px;
    --deg: -135deg;
    animation-direction: reverse;
    overflow: visible;
  }
}
